#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int checkSalvager(int p, struct gameState *state) {

	int r, handCount, buys;

	buys = state->numBuys;
	handCount = state->handCount[p];

	cardEffect(salvager, 1, 0, 0, state, 0, 0);
	assert(r == 0);

	assert(handCount = state->handCount[p] + 2);
	assert(buys = state->numBuys - 1);

}

int main() {

	int r, p, handCount;
	int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, salvager, village, baron, great_hall};

	struct gameState G;

	for (p = 0; p < 2; p++) {	
		for (handCount = 0; handCount < 10; handCount++) {	
			memset(&G, 23, sizeof(struct gameState));
			r = initializeGame(2, k, 1, &G);
			G.handCount[p] = handCount;
			memset(G.hand[p], 0, sizeof(int) * handCount);
			checkSalvager(p, &G);
		}
	}
}
